__________________________________________________________________________________________________
class Solution:
    def isArmstrong(self, N: int) -> bool:
        k = len(str(N))
        N0, tot = N, 0
        while N > 0:
            tot += (N % 10) ** k
            N //= 10
        return tot == N0
__________________________________________________________________________________________________
class Solution:
    def isArmstrong(self, N: int) -> bool:
        k = len(str(N))
        return sum(pow(int(d), k) for d in str(N)) == N
__________________________________________________________________________________________________
